#include <bits/stdc++.h>
#define ll long long
#define endl '\n'

using namespace std;

string Add(string& s1,string& s2)
{
    //reverse(s1.begin(),s1.end());
    //reverse(s2.begin(),s2.end());
    string ans;
    int minNum = min(s1.size(),s2.size());
    int next = 0,cur = 0;
    for(int i = 0;i<minNum;++i)
    {
        int a = s1[i]-'0';
        int b = s2[i]-'0';
        int prev = next;
        next = (a+b+prev)/10;
        cur = (a+b+prev)%10;
        ans+=(cur+'0');
    }
    string& tmp = (s1.size()>s2.size())?s1:s2;
    for(int i = minNum;i<tmp.size();++i)
    {
        int a = tmp[i]-'0';
        int prev = next;
        next = (a+prev)/10;
        cur = (a+prev)%10;
        ans+=(cur+'0');
    }
    if(next!=0) ans+=(next+'0');
    //while(ans.back()=='0') ans.pop_back();
    //reverse(ans.begin(),ans.end());
    return ans;
}

void solve()
{
    string s1,s2;
    cin>>s1>>s2;
    reverse(s1.begin(),s1.end());
    reverse(s2.begin(),s2.end());
    while(s1.back()=='0') s1.pop_back();
    while(s2.back()=='0') s2.pop_back();
    if(s1.empty()||s2.empty())
    {
        cout<<0<<endl;
        return;
    }
    string& ls = (s1.size()>s2.size())?s1:s2;
    string& ss = (s1.size()>s2.size())?s2:s1;
    int minNum = min(s1.size(),s2.size());
    int maxNum = max(s1.size(),s2.size());
    string ans;
    int next = 0,cur = 0;
    int i = 0;
    for(i = 0;i<minNum;++i)
    {
        string inAns;
        int num = ss[i]-'0';
        for(int j = 0;j<maxNum;++j)
        {
            //suf
            int inNum = ls[j]-'0';
            int tmp = next;
            next = (num*inNum+tmp)/10;
            cur = (num*inNum+tmp)%10;
            inAns+=(cur+'0');
        }
        if(next!=0)
        {
            inAns+=(next+'0');
            next = 0;
        }
        for(int j = i;j>0;--j)
        {
            inAns.insert(0, "0");
        }
        ans = Add(ans,inAns);
    }
    //if(next!=0) ans+=(next+'0');
    while(ans.back()=='0') ans.pop_back();
    reverse(ans.begin(),ans.end());
    cout<<ans<<endl;
}

int main()
{
    std::ios::sync_with_stdio(false);
    std::cin.tie(nullptr);
    std::cout.tie(nullptr);
    solve();
    return 0;
}
